package com.pang.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author： pang-yun
 * @date： 2022-02-17 15:09
 * Description:
 */

@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${config.username}")
    private String username;

    @GetMapping("/getName")
    public String getName(){
        return username;
    }


}
